package com.ruoyi.finance.service.impl;

import com.ruoyi.finance.domain.FmsStaff;
import com.ruoyi.finance.mapper.FmsStaffMapper;
import com.ruoyi.finance.service.IFmsStaffService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 员工 服务层实现
 *
 * @author 夜雨
 */
@Service
public class FmsStaffServiceImpl implements IFmsStaffService {
    @Autowired
    private FmsStaffMapper staffMapper;

    /**
     * 查询员工
     *
     * @param staffId 员工ID
     * @return 员工
     */
    @Override
    public FmsStaff selectStaffById(Long staffId) {
        return staffMapper.selectStaffById(staffId);
    }

    /**
     * 查询员工列表
     *
     * @param staff 员工
     * @return 公告集合
     */
    @Override
    public List<FmsStaff> selectStaffList(FmsStaff staff) {
        return staffMapper.selectStaffList(staff);
    }

    /**
     * 新增员工
     *
     * @param staff 员工
     * @return 结果
     */
    @Override
    public int insertStaff(FmsStaff staff) {
        return staffMapper.insertStaff(staff);
    }

    /**
     * 修改员工
     *
     * @param staff 员工
     * @return 结果
     */
    @Override
    public int updateStaff(FmsStaff staff) {
        return staffMapper.updateStaff(staff
        );
    }

    /**
     * 删除员工
     *
     * @param staffId 员工ID
     * @return 结果
     */
    @Override
    public int deleteStaffById(Long staffId) {
        return staffMapper.deleteStaffById(staffId);
    }

    /**
     * 批量删除员工
     *
     * @param staffIds 需要删除的员工ID
     * @return 结果
     */
    @Override
    public int deleteStaffByIds(Long[] staffIds) {
        return staffMapper.deleteStaffByIds(staffIds);
    }
}
